package eddy.yang.wordpad;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.net.URL;

import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JLabel;

class AbortDialog extends JDialog {
	public AbortDialog() {
		setTitle("Abort");
		URL url = EddyWordPad.class.getResource("resources/Splash.jpg");
		JLabel splashLabel = new JLabel(new ImageIcon(url));
		add(splashLabel, BorderLayout.CENTER);
		pack();
	}	
	
	public void showDialog() {
		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
		this.setLocation(d.width/2 - this.getWidth()/2, d.height/2 - this.getHeight()/2);		
      this.setVisible(true);  
   }
}